<?php
namespace app\admin\controller;
use app\BaseController;
use mailer\tp6\Mailer;
use think\facade\Cache;
use think\facade\Config;
use think\facade\Session;

class SendFile extends BaseController {
     public static function   sendFileInfo($toUser,$title,$content){
        Session::set('file_yzm',$content);
        Cache::set('send_yzm',$content,60);
         $mailer = Mailer::instance();
         $mailer->from(Config::get('mailer.addr'),Config::get('mailer.name'))
             ->to($toUser)
             ->subject($title)
             ->text($content)
             ->send();
         }
}